<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>UVFileLogger Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1333)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">IJKMediaPlayer-static </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">UCloud</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	
	<optgroup label="Properties">
		
		<option value="//api/name/automaticallyAppendNewlineForCustomFormatters">automaticallyAppendNewlineForCustomFormatters</option>
		
		<option value="//api/name/currentLogFileInfo">currentLogFileInfo</option>
		
		<option value="//api/name/doNotReuseLogFiles">doNotReuseLogFiles</option>
		
		<option value="//api/name/logFileManager">logFileManager</option>
		
		<option value="//api/name/maximumFileSize">maximumFileSize</option>
		
		<option value="//api/name/rollingFrequency">rollingFrequency</option>
		
	</optgroup>
	

	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/didLogMessage">- didLogMessage</option>
		
		<option value="//api/name/init">- init</option>
		
		<option value="//api/name/initWithLogFileManager:">- initWithLogFileManager:</option>
		
		<option value="//api/name/rollLogFile">- rollLogFile</option>
		
		<option value="//api/name/rollLogFileWithCompletionBlock:NS_SWIFT_NAME:">- rollLogFileWithCompletionBlock:NS_SWIFT_NAME:</option>
		
		<option value="//api/name/shouldArchiveRecentLogFileInfo:">- shouldArchiveRecentLogFileInfo:</option>
		
		<option value="//api/name/willLogMessage">- willLogMessage</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">UVFileLogger Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td><a href="../Classes/UVAbstractLogger.html">UVAbstractLogger</a> : NSObject</td>
</tr><tr>
	<th>Conforms to</th>
	<td><a href="../Protocols/UVLogger.html">UVLogger</a></td>
</tr><tr>
	<th>Declared in</th>
	<td>UVFileLogger.h</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>The standard implementation for a file logger</p>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/init" title="init"></a>
	<h3 class="method-title"><code><a href="#//api/name/init">&ndash;&nbsp;init</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Default initializer</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (instancetype)init</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/initWithLogFileManager:" title="initWithLogFileManager:"></a>
	<h3 class="method-title"><code><a href="#//api/name/initWithLogFileManager:">&ndash;&nbsp;initWithLogFileManager:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Designated initializer, requires a <a href="../Protocols/UVLogFileManager.html"><code>UVLogFileManager</code></a> instance</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (instancetype)initWithLogFileManager:(id&lt;UVLogFileManager&gt;)<em>logFileManager</em></code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/willLogMessage" title="willLogMessage"></a>
	<h3 class="method-title"><code><a href="#//api/name/willLogMessage">&ndash;&nbsp;willLogMessage</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Called when the logger is about to write message. Call super before your implementation.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)willLogMessage</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/didLogMessage" title="didLogMessage"></a>
	<h3 class="method-title"><code><a href="#//api/name/didLogMessage">&ndash;&nbsp;didLogMessage</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Called when the logger wrote message. Call super after your implementation.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)didLogMessage</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/shouldArchiveRecentLogFileInfo:" title="shouldArchiveRecentLogFileInfo:"></a>
	<h3 class="method-title"><code><a href="#//api/name/shouldArchiveRecentLogFileInfo:">&ndash;&nbsp;shouldArchiveRecentLogFileInfo:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Called when the logger checks archive or not current log file.
Override this method to exdend standart behavior. By default returns NO.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)shouldArchiveRecentLogFileInfo:(UVLogFileInfo *)<em>recentLogFileInfo</em></code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/maximumFileSize" title="maximumFileSize"></a>
	<h3 class="method-title"><code><a href="#//api/name/maximumFileSize">&nbsp;&nbsp;maximumFileSize</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Log File Rolling:</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (readwrite, assign) unsigned long long maximumFileSize</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p><code>maximumFileSize</code>:
The approximate maximum size (in bytes) to allow log files to grow.
If a log file is larger than this value after a log statement is appended,
then the log file is rolled.</p>

<p><a href="#//api/name/rollingFrequency"><code>rollingFrequency</code></a>
How often to roll the log file.
The frequency is given as an <code>NSTimeInterval</code>, which is a double that specifies the interval in seconds.
Once the log file gets to be this old, it is rolled.</p>

<p><a href="#//api/name/doNotReuseLogFiles"><code>doNotReuseLogFiles</code></a>
When set, will always create a new log file at application launch.</p>

<p>Both the <code>maximumFileSize</code> and the <a href="#//api/name/rollingFrequency"><code>rollingFrequency</code></a> are used to manage rolling.
Whichever occurs first will cause the log file to be rolled.</p>

<p>For example:
The <a href="#//api/name/rollingFrequency"><code>rollingFrequency</code></a> is 24 hours,
but the log file surpasses the <code>maximumFileSize</code> after only 20 hours.
The log file will be rolled at that 20 hour mark.
A new log file will be created, and the 24 hour timer will be restarted.</p>

<p>You may optionally disable rolling due to filesize by setting <code>maximumFileSize</code> to zero.
If you do so, rolling is based solely on <a href="#//api/name/rollingFrequency"><code>rollingFrequency</code></a>.</p>

<p>You may optionally disable rolling due to time by setting <a href="#//api/name/rollingFrequency"><code>rollingFrequency</code></a> to zero (or any non-positive number).
If you do so, rolling is based solely on <code>maximumFileSize</code>.</p>

<p>If you disable both <code>maximumFileSize</code> and <a href="#//api/name/rollingFrequency"><code>rollingFrequency</code></a>, then the log file won&rsquo;t ever be rolled.
This is strongly discouraged.</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/rollingFrequency" title="rollingFrequency"></a>
	<h3 class="method-title"><code><a href="#//api/name/rollingFrequency">&nbsp;&nbsp;rollingFrequency</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>See description for <a href="#//api/name/maximumFileSize"><code>maximumFileSize</code></a></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (readwrite, assign) NSTimeInterval rollingFrequency</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/doNotReuseLogFiles" title="doNotReuseLogFiles"></a>
	<h3 class="method-title"><code><a href="#//api/name/doNotReuseLogFiles">&nbsp;&nbsp;doNotReuseLogFiles</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>See description for <a href="#//api/name/maximumFileSize"><code>maximumFileSize</code></a></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (readwrite, assign, atomic) BOOL doNotReuseLogFiles</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/logFileManager" title="logFileManager"></a>
	<h3 class="method-title"><code><a href="#//api/name/logFileManager">&nbsp;&nbsp;logFileManager</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>The <a href="../Protocols/UVLogFileManager.html">UVLogFileManager</a> instance can be used to retrieve the list of log files,
and configure the maximum number of archived log files to keep.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (strong, nonatomic, readonly) id&lt;UVLogFileManager&gt; logFileManager</code></div>

		    
			

			

			

			

			

			
			<div class="method-subsection see-also-section">
				<h4 class="method-subtitle">See Also</h4>
				<ul>
					
					<li><code><p><a href="../Protocols/UVLogFileManager.html">UVLogFileManager</a>.maximumNumberOfLogFiles</p></code></li>
					
				</ul>
			</div>
			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/automaticallyAppendNewlineForCustomFormatters" title="automaticallyAppendNewlineForCustomFormatters"></a>
	<h3 class="method-title"><code><a href="#//api/name/automaticallyAppendNewlineForCustomFormatters">&nbsp;&nbsp;automaticallyAppendNewlineForCustomFormatters</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>When using a custom formatter you can set the <code>logMessage</code> method not to append
<code>\n</code> character after each output. This allows for some greater flexibility with
custom formatters. Default value is YES.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readwrite, assign) BOOL automaticallyAppendNewlineForCustomFormatters</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/rollLogFileWithCompletionBlock:NS_SWIFT_NAME:" title="rollLogFileWithCompletionBlock:NS_SWIFT_NAME:"></a>
	<h3 class="method-title"><code><a href="#//api/name/rollLogFileWithCompletionBlock:NS_SWIFT_NAME:">&ndash;&nbsp;rollLogFileWithCompletionBlock:NS_SWIFT_NAME:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>You can optionally force the current log file to be rolled with this method.
CompletionBlock will be called on main queue.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)rollLogFileWithCompletionBlock:(void ( ^ ) ( ))<em>completionBlock</em> NS_SWIFT_NAME</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/rollLogFile" title="rollLogFile"></a>
	<h3 class="method-title"><code><a href="#//api/name/rollLogFile">&ndash;&nbsp;rollLogFile</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Method is deprecated. (<b class="deprecated">Deprecated:</b><span class="deprecated"> Use <code>rollLogFileWithCompletionBlock:</code> method instead.</span>)</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)rollLogFile</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/currentLogFileInfo" title="currentLogFileInfo"></a>
	<h3 class="method-title"><code><a href="#//api/name/currentLogFileInfo">&nbsp;&nbsp;currentLogFileInfo</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Returns the log file that should be used.
If there is an existing log file that is suitable,
within the constraints of <a href="#//api/name/maximumFileSize"><code>maximumFileSize</code></a> and <a href="#//api/name/rollingFrequency"><code>rollingFrequency</code></a>, then it is returned.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, strong) UVLogFileInfo *currentLogFileInfo</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>Otherwise a new file is created and returned.</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">UVFileLogger.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2017 UCloud. All rights reserved. Updated: 2017-04-18</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1333)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>